#ifndef CHANGEPASSWORD_H
#define CHANGEPASSWORD_H

#include <QDialog>
#include <QNetworkAccessManager>
#include <QNetworkReply>

class MessagePops;

namespace Ui {
class ChangePassword;
}

class ChangePassword : public QDialog
{
    Q_OBJECT

public:
    explicit ChangePassword(QWidget *parent = nullptr);
    ~ChangePassword();


private slots:
    void receMessage(QString data);
    void receMessage2(QString data);

private slots:
    void deletetimer();

    void requestFinished(QNetworkReply*);
    void on_pushButton_clicked();
    void on_pushButton_2_clicked();
    void on_pushButton_3_clicked();
    void on_pushButton_4_clicked();
    void on_pushButton_5_clicked();

    void on_lineEdit_returnPressed();    
    void on_lineEdit_2_returnPressed();
    void on_lineEdit_3_returnPressed();
    

    void on_lineEdit_textChanged(const QString &arg1);

    void on_lineEdit_2_textChanged(const QString &arg1);

    void on_lineEdit_3_textChanged(const QString &arg1);

signals:
    void sendChangePassword(QString);


private:
    void setpush();//设置登入按钮样式

private:
    QTimer *deletetime;

    MessagePops *mps;
    MessagePops *mps2;

    QNetworkAccessManager naManager;

    QString oldpassword;//旧密码
    QString newpassword1;//新密码
    QString newpassword2;//确认新密码

    bool Password_conceal = false;//标志位判断是否需要隐藏密码
    bool Password_conceal2 = false;//标志位判断是否需要隐藏密码
    bool Password_conceal3 = false;//标志位判断是否需要隐藏密码

    Ui::ChangePassword *ui;
};

#endif // CHANGEPASSWORD_H
